 Mocha W32 TN5250 Help Index

How To ...

5250 keyboard mapping

Change keyboard mapping

Change ASCII-EBCDIC mapping

Change Window size

Press PF18 key with the default keyboard mapping

Parameters to Mocha W32 TN5250

Use different configurations

Check for latest version

Order Mocha W32 TN5250

Technical Support

Commands

File menu

Edit menu

View menu

Settings

Help menu


File menu commands

The File menu offers the following commands:

Connect	Connect to Host.
Disconnect	Close a connection to a Host.
Print Screen	Print current screen.
Print Setup	Selects a printer and printer connection.
Sending	Send the active screen through electronic mail.
Exit	Exits Mocha W32 TN5250.


Edit menu commands

The Edit menu offers the following commands:

Copy	Copies data from the screen to the clipboard.
Paste	Pastes data from the clipboard into the screen at cursor position.
Reset Terminal	Opens the keyboard. Used to abort a X-WAIT situation.
Ctrl+C and CTRL+V	Selects if keys CTRL C and CTRL V should be enabled.


View menu commands

The View menu offers the following commands:

Toolbar	Shows or hides the toolbar.
Status Bar	Shows or hides the status bar.


Settings menu commands

The Settings menu is used to define the configuration of Mocha TN5250. At Exit from Mocha TN5250 the configuration is saved automatically.

Font	Select font type and size to use in the display.
Colors	Define colors in the display.
Proxy Configuration	It is possible to connect via a proxy server. This menu is used to configure the proxy communication.
Reset Configuration	Reset all parameters to installation defaults.
License	Add license key, to make Your Mocha W32 TN5250 legal.
Mapping Files	Define Keyboard and data mapping files.
Printer	Select font for printer.
Show Negotiation	Define if the telnet negotiation should be displayed.
Termtype	Type of 5250 Terminal.
Log Traffic	Select if all data traffic should be traced.


Help menu commands

The Help menu offers the following commands, which provide you assistance with this application:

Help Topics	Offers you an index to topics on which you can get help.
Keyboard Mapping	Shows the current keyboard mapping in a window.
About	Displays the version and license information of Mocha TN5250.


Connect
Connect command (File menu)

Use this command to create a new connection to a Host.

  Host : Name of the host. Either an TCP/IP address as 155.22.11.2 or a symbolic name.

  Port :  Most TN5250 applications uses port 23.

  Use as default host :

     If this checkbox is enabled, Mocha TN5250 will login without user action, when it is started.

     (Only if no host parameter is given as parameter to MTN5250.exe)


Disconnect
Disconnect command (File menu)

Use this command to disconnect from a Host.


File Exit command
Exit command (File menu)

Use this command to end your Mocha W32 TN5250 session.  You can also use the Close command on the application Control menu.


Sending  command
Sending command (File menu)

Use this command to send a copy of the screen as an electronic mail.


negotiation option
Show Negotiation (Settings menu)

Use this command to select if the telnet negotiation should be displayed. Default is off.


trace option
Log Traffic (Settings menu)

Use this command to define a log file, and toggle trace on/off. This option should only be used in error situations, as the log file uses space on the disk.


termtype
Term Type (Settings menu)

Use this command to define the type of 5250 Information System terminal to emulate.

•	IBM 3477-FC : 27 * 132 Color display

•	IBM 3179-2 : 24 * 80 Color Display


copy
Copy command (Edit menu)

Use this command to copy selected data onto the clipboard.  This command is unavailable if there is no data currently selected. Data is selected with pressing the left mouse key and moving the mouse over the area to select.

Also key CTRL+C can be used for this operation.

Copying data to the clipboard replaces the contents previously stored there.


copy
Ctrl C and Ctrl V  (Edit menu)

Use this command to define if the standard Windows-95 key for copy and paste should be enabled.


paste
Paste command (Edit menu)

Use this command to insert a copy of the clipboard contents at the cursor.  This command is unavailable if the clipboard is empty. Also the right mouse key or CTRL V can be used to paste data.


reset configuration
Reset Terminal command (Edit menu)

Use this command to unlock the keyboard. If the default keyboard mapping is used, it is easier just to press the ESC key.


View Toolbar command
Toolbar command (View menu)

Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in Mocha W32 TN5250.

See Toolbar for help on using the toolbar.


Toolbar

The toolbar is displayed across the top of the application window, below the menu bar.  The toolbar provides quick mouse access to many tools used in Mocha W32 TN5250.

To hide or display the Toolbar, choose Toolbar from the View menu.


View Status Bar Command
Status Bar command (View menu)

Use this command to display and hide the Status Bar, which describes the action to be executed by the selected menu item or depressed toolbar button, and keyboard latch state. A check mark appears next to the menu item when the Status Bar is displayed.

See Status Bar for help on using the status bar.


Status Bar

The status bar is displayed at the bottom of the Mocha W32 TN5250 window.  To display or hide the status bar, use the Status Bar command in the View menu.

The left area of the status bar describes actions of menu items as you use the arrow keys to navigate through menus.  This area similarly shows messages that describe the actions of toolbar buttons as you depress them, before releasing them.  If after viewing the description of the toolbar button command you wish not to execute the command, then release the mouse button while the pointer is off the toolbar button.

The right areas of the status bar contains 4 frames:

5250 status :

OFFLINE	no connection
ONLINE	connected to a host
REQUEST	is displayed while creating a session to the IBM Host
Keyboard status:

ASCII MODE	if connected to a normal telnet Host.
X - WAIT	data has been send to the IBM Host, and a new picture is expected
X - WRONG INPUT	cannot accept input at the cursor position
Insert status:

INSERT	if in insert mode.

Last Key status:

X-PROG ERROR	an error has been detected in the 5250 data stream
key name	last function key pressed.

Message light:

M	Message light On


about
About command (Help menu)

Use this command to display license and version number of your copy of Mocha W32 TN5250


Title Bar

The title bar is located along the top of a window.  It contains the Mocha W32 TN5250 name and

 the host connected to.


No Help Available

No help is available for this area of the window.


screen fonts
Font (Settings menu)

Changes font, style (such as bold and italic), font size, color, and font effects.

Tab Options

Font

Type or select a font name. The  list is  the non proportionally spaced fonts available in your system. The screen will be scaled to the font, giving a display of 24*80 characters.

Font Style

Select a style. To use the default type style for a given font, select Regular.

Size

Type or select a size.

Color

Type or select one of the 16 predefined colors. Can also be defined from the Color menu

Preview

Shows the effects of the formatting you specify before you apply it to the document.


color
Color (Settings menu)

It is possible to customize most colors in Mocha W32 TN5250. Select a color with the mouse and click OK. The number of possible colors depends of the hardware configuration. Most colors should not be changed from there default values.

•	Color Select gives the color of the area selected with the mouse in a Copy operation.


Hex key

If the keyboard does not support a national key, it is possible to enter the hexadecimal  value for the key. Select this option with button Hex, and a dialog box will pop up.

Legal values are between 40 and FE. See IBM manual : IBM 5250 Information Display System, SA21-9247-6, for the different national Character values.


proxy setup
Proxy Configuration (Settings menu)

It is possible to use a TN5250 proxy host as gateway to other hosts. Mocha W32 TN5250 will connect to the proxy host and issue a new login sequence. As there is a limited standard for how to issue this login sequence, it has been designed very dynamic for Mocha W32 TN5250.

Options

Proxy host

IP address of the proxy host

Proxy port

Port number of the TN5250 server daemon on the proxy server

Proxy syntax

Format of the connect string to send at login.

    $1 :  host

    $2 :  port

    \abc = octal value. (LF = \012 and CR = \015)

Example:

  proxy host = myproxy

  proxy port = 911

  proxy syntax =\012Connnect $1:$2\015\012

  In the connect dialog host name wintermute and port 23 is given.

  Mocha W32 TN5250 will connect to myproxy port 911, and send the connect

  sequence: <LF>Connect wintermute:23<CR><LF>

Connect through a proxy server

Use this checkbox to enable the use of a proxy server.


Reset Configuration (Settings menu)

Reset all Configuration parameters in  Mocha W32 TN5250.


license
License (Settings menu)

After ordering Mocha W32 TN5250 from MochaSoft, a license key will be received. Enter the key together with the Company Name given on the Order. As there is link between the Company name and license key it is important to enter both very careful.


keyboard file
Mapping Files (Settings menu)

It is possible to customize the names of the mapping files.

Function Keys:	How to map function keys are defined in this file
EBCDIC <-> ASCII:	This file describes the mapping between the IBM Hosts Code- Page and the ASCII characters used in Mocha W32 TN5250


printer configuration
Printer (Settings menu)

Changes font, style (such as bold and italic) and font size for the printer.

Tab Options

Font

Type or select a font name. The  list is  the non proportionally spaced fonts available in your system.

Font Style

Select a style. To use the default type style for a given font, select Regular.

Size

Type or select a size.


order Mocha W32 TN5250
How to Order Mocha W32 TN5250

It is possible to buy Mocha W32 TN5250 via the Internet. Visit www.mochasoft.dk , and get the latest information about the products and prices. Also check out the Java version of Mocha TN5250.


version
How to Check for latest Version

Visit the MochaSoft home page at www.mochasoft.dk, and receive information about the latest development of the product. The version of Your copy of Mocha W32 TN5250 can be checked in menu help-about.


startup parameters
Parameters to Mocha W32 TN5250

Mocha W32 TN5250 can be started with a set of parameters:

/H host     : make a connection to ‘host’

/P port      : don’t use default TN5250 port 23 on the host, but number ‘port’

/C number : select a configuration. Default is number  1. Values 1 - 9 is legal.

/S1            : Secure mode. Not possible to save the configuration on exit.

/R1            : Selection of host to connect is restricted. Use /H option to define the host name.


configuration
Use different configurations

It is possible to use Mocha W32 TN5250 with up to 9 different configurations. As an example a red background for host MVS and a black background for host AS400.

Use the parameter /C  , see Parameters to Mocha W32 TN5250  to startup with an unique configuration.


Change keyboard mapping

Mocha W32 TN5250 comes with a default IBM 5250 keyboard. It is possible to customize all function keys with a keyboard mapping file. See Keyboard FileThe  syntax of the file is

# is a comment

<keyname> <5250 key>

Possible keyname:

HOME	HOME key
END	END key
PGUP	Page Up key
PGDN	Page Down key
ESC	ESC key
RETURN	RETURN key
ENTER	Enter key
MINUS	Numeric keypad -
PLUS	Numeric keypad +
CTRL	Right Ctrl key
PAUSE	Pause key
SCROLL	Scroll Lock key
BACKSPACE	<-- key
DELETE	Del (Delete) key
f1 - f20	function key f1 - f20
F1 - F20	function key f1 - f20 + SHIFT
cf1 - cf20	function key f1 - f20 + CTRL
CF1 - CF20	function key f1 - f20 + SHIFT + CTRL

Possible 5250 keys:

PF1 - PF24	5250 function keys
INSERT	INSERT key. (is also mapped to pc key Ins)
ERASEINPUT	Erase all input fields
CLEAR	Send CLEAR to IBM Host, and delete the screen
BTAB	Goto previous field
TAB	Goto next field
RESET	Open keyboard (can also be called from edit menu)
ENTER	Send ENTER key to IBM Host
HELP	Send HELP key to IBM Host
PGDN	Send Page down (roll up) key to IBM Host
PGUP	Send Page up (roll down)  key to IBM Host
FIELD-	Field - key
FIELD+	Field + key
FIELDEXIT	Field exit key
RECORD	Record Backspace (home)
DUP	DUP key
SYSREQ	Sys Req key
DELETENOMOVE	Delete character at cursor, and keep the cursor position
LEFTDELETE	Character to the left of the cursor is removed
ATTN	Attention key

Example:

# TN5250  keymap

# f1 = f1 key , F1 = shift F1

# cf1 = f1 + ctrl  CF1 = shift f1 + ctrl

#

# <pc - key>  <5250 key>

f1   PF1

f2   PF2

f3   PF3


How to Press PF18 key with default keyboard

A standard PC keyboard will only have keys F1 - F12. These are mapped to PF1 -  PF12. To Select keys higher than PF12 with the default  mapping :

Shift F1	= F13
Shift F2	= F14
Shift F3	= F15
Shift F4	= F16
Shift F5	= F17
Shift F6	= F18
Shift F7	= F19
Shift F8	= F20
Shift F9	= F21
Shift F10	= F22
Shift F11	= F23
Shift F12	= F24

Remark, it is possible to change the default mapping. See Keyboard mapping


keyboard mapping
5250 Keyboard mapping

Mocha W32 TN5250 comes with a default 5250 keyboard.

 PC-Key     5250-Key           PC-Key           5250-Key

-------------------------------      -----------------------------------

  f1              f1                         crtl f1              Attn

  f2              f2                         ctrl f2              SysReq

  f3              f3                         ctrl f3              INSERT

  f4              f4                         ctrl f4              ERASE INPUT

  f5              f5                         ctrl f5              DUP

  f6              f6                         ctrl f6              -

  f7              f7                         ctrl f7              -

  f8              f8                         ctrl f8              -

  f9              f9                         ctrl f9              -

  f10            f10                       ctrl f10             -

  f11            f11                       ctrl f11             -

  f12            f12                       ctrl f12             -

 PC-Key     5250-Key          PC-Key          5250-Key

-------------------------------      ------------------------------------

  shift f1        f13                     crtl shift f1        HELP

  shift f2        f14                     ctrl shift f2        CLEAR

  shift f3        f15                     ctrl shift f3

  shift f4        f16                     ctrl shift f4        -

  shift f5        f17                     ctrl shift f5        -

  shift f6        f18                     ctrl shift f6        -

  shift f7        f19                     ctrl shift f7        -

  shift f8        f20                     ctrl shift f8        -

  shift f9        f21                     ctrl shift f9        -

  shift f10      f22                     ctrl shift f10       -

  shift f11      f23                     ctrl shift f11       -

  shift f12      f24                     ctrl shift f12       -

Editing keys:

 PC-Key                5250-Key

----------------------------------------

HOME	Record
END	Field Exit
PAGE UP	Page Up (Roll Down)
PAGE DOWN	Page Down (Roll Up)
INSERT	INSERT
ESC	Reset (open keyboard)
RETURN	Enter
SHIFT TAB	Previous Field
TAB	Next Field
Right CTRL	ENTER
PAUSE	RESET (open keyboard)
SCROLL LOCK	CLEAR
DEL	Delete character at cursor position
BACKSPACE	Delete character to the left of the cursor
Keypad -	Field -
Keypad +	Field
Keypad Enter	Field Exit


Reference

Mocha W32 TN5250 is an application written for Windows-95/NT. It makes it possible to connect to a host via TCP/IP with the TN5250 protocol and emulate a 5250 work station.


Technical Support

Visit the MochaSoft home page at www.mochasoft.dk, and receive information about how to contact MochaSoft. Collect a trace file with option Log Traffic


keyboard mapping window
Keyboard Mapping (HELP MENU)

This menu option displays the current mapping of the keyboard.


Window size

It is possible to change the size of the window, with simply drag the window border of Mocha W32 TN5250. The font size does not change. To work with a window in full view, meaning it is possible to see all 24*80 (or 27 * 132) characters, select menu Settings font, and define another font size. Hereafter the window will scale to the new font size.


Character mapping
ASCII - EBCDIC mapping

As IBM hosts uses different codepages, it is not possible to include all possible types of layout in Mocha TN5250.

File ebcdic.ebc contains an ASCII - EBCDIC table, which will work in most cases. If national characters are used, it is necessary to change this file.It can be done with any ASCII editor.

Which translation table to use is defined in menu Settings Mapping Files

The syntax of the file is :

# This is a comment

<ebcdic value>  <ascii value>

Example:

 # part of a file

 40 20

 81 a

 82 b

 83 c

 84 d

Remark it is possible to write ASCII value either as a 2 digit hex number or an ASCII character.

In the example above a hex value 0x83 from the Host is translated to ASCII character 'c'.

If identical ASCII values are defined for more than one ebcdic character, the last will be valid, when translating from ASCII to ebcdic. If as an example ebcdic 0x50 should be translated to an ASCII space it is important to put the line

0x50 0x20

before

0x40 0x20

Otherwise Users input when pressing the space bar will be wrong. A value of 0x40 should be expected.

Mocha W32 TN5250 comes with following layouts:

  ebcdic.map   : US layout (default)

File ebcdic.map

============

Mocha TN5250 comes with an ASCII - EBCDIC layout as:

	0	1	2	3	4	5	6	7	8	9	A	B	C	D	E	F
0	SP				SP	&	-	ø	Ø	°	µ	^	{	}	\	0
1					SP	é	/	É	a	j	~	£	A	J		1
2					â	ê	Â	Ê	b	k	s	¥	B	K	S	2
3					ä	ë	Ã	Ë	c	l	t	·	C	L	T	3
4					à	è	À	È	d	m	u	×	D	M	U	4
5					á	í	Á	Í	e	n	v	§	E	N	V	5
6					ã	î	Ã	Î	f	o	w	¶	F	O	W	6
7					å	i	Å	Ï	g	p	x	¼	G	P	X	7
8					ç	ì	Ç	Ì	h	q	y	½	H	Q	Y	8
9					ñ	ß	Ñ	`	i	r	z	¾	I	R	Z	9
A					¢	!	|	:	«	ª	¡	[	­	¹	²	³
B					.	$	,	#	»	º	¿	]	ô	û	Ô	Û
C					<	.	%	@	ð	æ	Ð	¯	ö	ü	Õ	Ü
D					(	)	_	‘	ý	¸	Ý	¨	ò	ù	Ò	Ù
E					+	;	>	=	Þ	Æ	þ	´	ó	ú	Ó	Ú
F					|	¬	?	“	±	¤	®	©	õ	ÿ	Õ
SP = space

Above EBCDIC value 0xd4 = 'M'

See also menu option  Mapping Files


File Print command
Print command (File menu)

Use this command to print a copy of the screen.   This command presents a Print dialog box, where you may specify the number of copies, the destination printer, and other printer setup options.


Print dialog box

The following options allow you to specify how the screen should be printed:

Printer

This is the active printer and printer connection.  Choose the Setup option to change the printer and printer connection.

Setup

Displays a Print Setup dialog box, so  you can select a printer and printer connection.

Copies

Specify the number of copies you want to print for the above page range.


Print Progress Dialog

The Printing dialog box is shown during the time that Mocha W32 Telnet is sending output to the printer.  The page number indicates the progress of the printing.

To abort printing, choose Cancel.


File Print Setup command
Print Setup command (File menu)

Use this command to select a printer and a printer connection.  This command presents a Print Setup dialog box, where you specify the printer and its connection.


Print Setup dialog box

The following options allow you to select the destination printer and its connection.

Printer

Select the printer you want to use.  Choose the Default Printer; or choose the Specific Printer option and select one of the current installed printers shown in the box.  You install printers and configure ports using the Windows Control Panel.

Orientation

Choose Portrait or Landscape.

Paper Size

Select the size of paper that the document is to be printed on.

Paper Source

Some printers offer multiple trays for different paper sources.  Specify the tray here.

Options

Displays a dialog box where you can make additional choices about printing, specific to the type of printer you have selected.

Network...

Choose this button to connect to a network location, assigning it a new drive letter.


File Page Setup Command
Page Setup command (File menu)